// 1974FEB Recoding

global keepers19741 ""

numlabel, add

genl id=feb001
global keepers19741 $keepers19741 id

genl year=19741
global keepers19741 $keepers19741 year

genl wt=1
global keepers19741 $keepers19741 wt

encode feb212, g(income) label(x)
recode income 1 2 =.
replace income=income-2
genl income3=income
centile income, c(33 66 100)
replace income3=0 if income<=r(c_1)
centile income, c(33 66 100)
replace income3=1 if income>r(c_1) & income<=r(c_2)
centile income, c(33 66 100)
replace income3=2 if income>r(c_2) & income<=r(c_3)
global keepers19741 $keepers19741 income3

genl pid_ce=feb129
recode pid_ce 2/8 = 0
global keepers19741 $keepers19741 pid_ce

genl vote_ce=feb115
recode vote_ce 2/8=0 0=.
global keepers19741 $keepers19741 vote_ce

genl turnout=feb114
recode turnout 2 3 8=0
global keepers19741 $keepers19741 turnout


// General Interest in Pols

codebook feb127
gen talkedaboutnew = feb127
recode talkedaboutnew 1=1 2=.5 3=0 8=.5 0=.
label variable talkedaboutnew "talked with others new"
label define talked 1 "1=talked to others"
label values talkedaboutnew talked
tab feb127 talkedaboutnew
global keepers19741 $keepers19741 talkedaboutnew

codebook feb024
gen intpolsnew = feb024
recode intpolsnew 8=2.5 0=.
replace intpolsnew=(abs(intpolsnew-4))/3
label variable intpolsnew "interest in pols"
label define interest 1 "1=high interest"
label values intpolsnew interest
tab feb024 intpolsnew
global keepers19741 $keepers19741 intpolsnew


// Issue Involvement

codebook feb021
gen intissuenew = feb021
recode intissuenew 1=1 2=0 8=.5 0=.
label variable intissuenew "cared about who won new"
label define care 1 "1=cared"
label values intissuenew care
tab feb021 intissuenew
global keepers19741 $keepers19741 intissuenew


// Media Exposure

codebook feb004
gen npfollownew = feb004
recode npfollownew 8=2.5 0=.
replace npfollownew=(abs(npfollownew-4))/3
label variable npfollownew "followed campaign in newspaper new"
label define follows 1 "1=followed"
label values npfollownew follows
tab feb004 npfollownew
global keepers19741 $keepers19741 npfollownew

codebook feb005
gen tvfollownew = feb005
recode tvfollownew 8=2.5 0=.
replace tvfollownew=(abs(tvfollownew-4))/3
label variable tvfollownew "followed campaign on tv new"
label values tvfollownew follows
tab feb005 tvfollownew
global keepers19741 $keepers19741 tvfollownew


// Ideology

codebook feb080
gen taxspendnew = feb080
recode taxspendnew 8=2.5 0=.
gen flipts = 5-taxspendnew
replace flipts=(abs(flipts-4))/3
replace taxspendnew = flipts
drop flipts
tab taxspendnew feb080
label variable taxspendnew "social spending new"
label define spend 1 "1=pro-spending" 
label values taxspendnew spend
tab feb080 taxspendnew
global keepers19741 $keepers19741 taxspendnew

codebook feb101
gen wagecntrlnew = feb101
recode wagecntrlnew 1=.5 2=1 3=0 8=.5 0=.
label variable wagecntrlnew "wage controls new"
label define increase 1 "increase"
label values wagecntrlnew increase
tab feb101 wagecntrlnew
global keepers19741 $keepers19741 wagecntrlnew

gen stateownnew = feb073
recode stateownnew 8=2.5 0=.
replace stateownnew = (abs(stateownnew-4))/3
label variable stateownnew "nationalisation new"
label define natnlown 1 "1=pro-nationalisation"
label values stateownnew natnlown
tab feb073 stateownnew
global keepers19741 $keepers19741 stateownnew

gen unionclosenessnew = feb173
recode unionclosenessnew 1=1 2=0 8=.5 0=.
label variable unionclosenessnew "feel close to unions new"
label define close 1 "close"
label values unionclosenessnew close
tab unionclosenessnew feb173
global keepers19741 $keepers19741 unionclosenessnew


// Class/occupation

// Assuming that husband is "head of household"
gen class_head_grade = feb268
recode class_head_grade 0=.
*label variable class_head_grade ""
label define LblClassGrade 1 "A: (Higher man.; prof." 2 "B: Lower man.; admin." 3 "C1A: Skilled; supervis. non-manu." 4 "C1B: Lower non-manu." 5 "C2: Skilled manu." 6 "D: Unskilled manu."
label values class_head_grade LblClassGrade
global keepers19741 $keepers19741 class_head_grade

gen class_resp_grade = feb262
recode class_resp_grade 0=.
*label variable class_head_grade ""
label values class_resp_grade LblClassGrade
global keepers19741 $keepers19741 class_resp_grade

gen male = feb199
recode male 1=1 2=0
global keepers19741 $keepers19741 male

gen married = feb200
recode married 1=0 2=1 3=1 4=0 5=0
global keepers19741 $keepers19741 married

gen unionmem_resp = feb245
recode unionmem_resp 0=0 10=1 20=1 30=1 31=1 32=1 33=1 34=1 35=1 36=1 37=1 40=1 77=1 88=1
global keepers19741 $keepers19741 unionmem_resp

gen unionmem_husb = feb246
recode unionmem_husb 0=0 10=1 20=1 30=1 31=1 32=1 33=1 34=1 35=1 36=1 37=1 40=1 77=1 88=1
global keepers19741 $keepers19741 unionmem_husb

gen unionmem_wife = feb247
recode unionmem_wife 0=0 10=1 20=1 30=1 31=1 32=1 33=1 34=1 35=1 36=1 37=1 40=1 77=1 88=1
global keepers19741 $keepers19741 unionmem_wife

gen unionmem_fami = feb248
recode unionmem_fami 0=0 10=1 20=1 30=1 31=1 32=1 33=1 34=1 35=1 36=1 37=1 40=1 77=1 88=1
global keepers19741 $keepers19741 unionmem_fami



// Economic perceptions

gen econ_ego_retro = feb152
recode econ_ego_retro 1/2=2 3=1 4/5=0 8=. 0=.
global keepers19741 $keepers19741 econ_ego_retro
